package cn.b.training.baby_education_training.service;

import cn.b.training.baby_education_training.entity.BabyHeight;
import cn.b.training.baby_education_training.service.dto.BabyHeightDto;
import org.springframework.data.domain.Page;

import java.text.ParseException;
import java.util.List;

/**
 * @program: baby_education_training
 * @description
 * @author: wuying
 * @create: 2022-12-01 09:15
 **/
public interface BabyHeightService {
    BabyHeight insertHeight(String recordTime, Float height) throws ParseException;
    /**
     * 通过id查询婴儿身高
     * @param id id
     * @return
     */
    BabyHeight getHeightById(Long id);

    /**
     * 通过婴儿id查询婴儿身高数据
     * @param babyId 婴儿id
     * @return
     */
    List<BabyHeight> getHeightByBabyId(Long babyId);

    /**
     * 修改婴儿身高信息
     * @param heightDto
     */
    boolean updateHeightInfo(BabyHeightDto heightDto) throws Exception;

    /**
     * 获取全部身高列表
     * @param page 页码
     * @param size 页长
     * @return Page<UserAccount> 账户分页列表
     */
    Page<BabyHeight> getAllHeights(Integer page, Integer size);

    boolean deleteHeight(Long id);
}
